$(function () {
    let queryId = $tool.getUrlQuery("id")
    $.ajax({
        url: `/api/getNewsDetail?id=${queryId}`,
        type: 'get',
        success: res => {
            if (res.code == 200) {
                res.result = res.result || []
                let dom = ``
                let queryItem = res.result[0]
                dom = `
                    <div class="title_box">
                        <button type="button" class="btn btn-dark back_btn">返回</button>
                        <p class="news_title">${queryItem.title}</p>
                        <span>日期:${queryItem.releaseDate}</span>
                    </div>
                    <div class="news_content">
                        ${queryItem.content}
                    </div>
                    `
                $(".news_box").html(dom)
                $(".back_btn").click(() => {
                    window.history.go(-1)
                })
            }
        },
    })
})